package com.yxuan.springboot.mapper;

import com.yxuan.springboot.model.Information;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 
 * @author zchao
 *    InformationMapper层
 * @date 2023-05-14 20:40:39
 */
@Mapper
public interface InformationMapper extends BaseMapper<Information> {

    /**
      * @className: InformationMapper.java
      * @methodName: queryInformationId
      * @effect: 返回表中所有数据的主键Id
      * @author: JingxuanFan
      * @date: 2023/5/18 19:56
      **/
    List<String> queryInformationId() throws Exception;

    /**
      * @className: InformationMapper.java
      * @methodName: queryoperationNum
      * @effect: 查询文章操作的数据条数（点赞数，收藏数，分享数，阅读数）
      * @author: JingxuanFan
      * @date: 2023/5/18 21:03
      **/
    String queryoperationNum(@Param("information") String information,@Param("operation") String operation) throws Exception;


    /**
      * @className: InformationMapper.java
      * @methodName: pagingQueryInformation
      * @effect: 文章资讯分页查询
      * @author: JingxuanFan
      * @date: 2023/5/28 15:32
      **/
    List<Information> pagingQueryInformation() throws Exception;

    List<Information> queryListByUserID(@Param("userID") Integer userID);
}
